<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<script type="text/javascript">
	var articleTextEditor = UE.getEditor('articleTextEditor');
	
	$('#fileupload').fileupload({
        url: "/upload/jquery",
        dataType: 'json',
        formData:{
        	index1:"jquery",
        	index2:"article"
        },
        done: function (e, data) {
            var json = data._response.result[0];
            $("#fileupload").next().val(json.url);
            $("#fileupload").parent().next().attr("src", json.url);
        }
    })
</script>

<div class="row">
	<div class="col-xs-12">
		<form class="form-horizontal" role="form">
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 栏目 </label>
			
				<div class="col-sm-10">
					<input type="text" id="form-field-1" class="col-sm-9"/>
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 标题 </label>
			
				<div class="col-sm-10">
					<input type="text" id="form-field-1" class="col-sm-9" />
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 作者 </label>
			
				<div class="col-sm-10">
					<input type="text" id="form-field-1" class="col-sm-9" />
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 来源 </label>
			
				<div class="col-sm-10">
					<input type="text" id="form-field-1" class="col-sm-9" />
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 关键词 </label>
			
				<div class="col-sm-10">
					<input type="text" id="form-field-1" class="col-sm-9" />
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 摘要 </label>
			
				<div class="col-sm-10">
					<input type="text" id="form-field-1" class="col-sm-9" />
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 缩略图 </label>
			
				<div class="col-sm-10">
					<span class="btn btn-success fileinput-button">
				        <i class="glyphicon glyphicon-plus"></i>
				        <span>上传缩略图...</span>
				        <!-- The file input field used as target for the file upload widget -->
				        <input id="fileupload" type="file" multiple>
				        <input type="hidden" name="article.img">
				    </span>
				    <img style="width:100px;height:100px;" src="">
				</div>
			</div>
			
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right"> 正文 </label>
				<div class="col-sm-9">
					<script type="text/plain" id="articleTextEditor"></script>
				</div>
				<div class="col-sm-1">
				</div>
			</div>
			
			<div class="space-4"></div>
			
		</form>
	</div>
</div>
